<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    var number = 1;
    var sum = 0;
    do{
        sum = sum + number;
        number++;
    }
    while (number <= 100);
    console.log('1到100的和为:'+sum);

</script>
<body>

</body>
</html>